package form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

public class SearchProductForm extends ActionForm {
	String   search_name = "";
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	public ActionErrors validate(ActionMapping mapping, HttpServletRequest req) 
	{    		
		ActionErrors errors = new ActionErrors ();
		if (this.search_name.length() == 0)	
			errors.add("name", new ActionMessage("personne.formulaire.name.vide"));
		return errors;
	}
	
	
	/**
	 * @return the search_name
	 */
	public String getSearch_name() {
		return search_name;
	}
	/**
	 * @param search_name the search_name to set
	 */
	public void setSearch_name(String search_name) {
		this.search_name = search_name;
	}
	
}
